import { useHttp } from "./useHttp";
import { Project } from "../types/project";
import { User } from "../types/user";
import { useQuery } from "react-query";

export const useUsers = (params?: Partial<Project>) => {
  const client = useHttp();

  return useQuery<User[]>(["users", params], ()=>
    client("users", {data:params}));
};
